
#pragma once

#include "ICond.h"

class CondI : public ICond
{
public:
	CondI();
	~CondI();
//////////////////////////// ICond //////////////////////////////////////////////
	virtual int8_t getCondType() { return (int8_t)EDupCondType::EDupCondType_I; };
	virtual bool init(IDuplicate *pDuplicate, const VEC_INT32 *pCond, const string &strSubCond);
	virtual void uninit();
	virtual void condUpdate();
	virtual bool finishCond();
	virtual int32_t result();
	virtual void onMonDie(uint32_t monsId, uint32_t num, int32_t leftNum);
	virtual void getMonsNum(MAP_UINT32_INT32 &mapMonsDieNum, MAP_UINT32_INT32 &mapMonsTotalNum);
private:
	int32_t checkCond();
	void notifyMonsNum();
	void addDieMons(uint32_t monsId,int32_t num);
private:
	IDuplicate *m_pDuplicate;
	const VEC_INT32 *m_pVecCond;
	int32_t m_result;
	bool m_finish;
	MAP_UINT32_INT32 m_mapCondMons; //条件怪
	MAP_UINT32_INT32 m_mapTotalMons; //所有的怪
	MAP_UINT32_INT32 m_mapDieMons; //已经死亡的怪
	uint32_t m_nStepIdx;//
};